<?php

// +----------------------------------------------------------------------

// | ThinkPHP [ WE CAN DO IT JUST THINK ]

// +----------------------------------------------------------------------

// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.

// +----------------------------------------------------------------------

// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )

// +----------------------------------------------------------------------

// | Author: liu21st <liu21st@gmail.com>

// +----------------------------------------------------------------------

use think\facade\Route;



//后台
//扫码买单
Route::group(function (){
    Route::rule('miniapp/qrcodeImg','admin.Miniapp/qrcodeImg');
    //不需要登录
    Route::rule('admin/login','admin.Login/login');
});

Route::group(function (){
    Route::rule('admin/getGoodsOrderexport','admin.Export/orderExport');
    Route::rule('admin/goodsExport','admin.Export/export');
    Route::rule('admin/goodsImport','admin.Export/goodsImport');

    //会员管理

    Route::group(function (){

        Route::rule('admin/balanceRecharge','admin.Member/balanceRecharge');
        Route::rule('admin/saveWhiteList','admin.Member/saveWhiteList');
        Route::rule('admin/getMemberList','admin.Member/index');
        Route::rule('admin/setMemberLevel','admin.Member/setLevel');
    });

    //合伙人管理

    Route::group(function (){

        Route::rule('admin/getPartnerDetail','admin.partner.Partner/detail');
        Route::rule('admin/getPartnerMemberlist','admin.partner.Partner/member_list');
        Route::rule('admin/getPartnerMoneylist','admin.partner.Partner/money_list');

    });
    //营销
    Route::group(function (){
        Route::rule('admin/showFlashSale','admin.marketing.FlashSale/show');
        Route::rule('admin/saveFlashSale','admin.marketing.FlashSale/save');
        Route::rule('admin/getActivityList','admin.marketing.Promotion/list');
        Route::rule('admin/saveActivity','admin.marketing.Promotion/saveActivity');
        Route::rule('admin/getTeamList','admin.marketing.Promotion/getTeam');
        Route::rule('admin/saveActivityStatus','admin.marketing.Promotion/saveStatus');
        Route::rule('admin/getActivityInfo','admin.marketing.Promotion/info');

    });
    //订单
    Route::group(function (){
        Route::rule('admin/getGoodsOrderList','admin.order.Order/index');
//        Route::rule('admin/getGoodsOrderexport','admin.order.Order/export');
        Route::rule('admin/getBuyOrderList','admin.order.Order/buyOrderList');
        Route::rule('admin/refundOrderList','admin.order.Order/refundOrderList');
        Route::rule('admin/refuseRefund','admin.order.Order/refuseRefund');
        Route::rule('admin/refund','admin.order.Order/refund');
        Route::rule('admin/buyRefund','admin.order.Order/buyRefund');
        Route::rule('admin/getGoodsOrderDetail','admin.order.Order/detail');
        Route::rule('admin/addBuyOrderRemarks','admin.order.Order/addBuyOrderRemarks');
        Route::rule('admin/orderRefund','admin.order.Order/orderRefund');
        Route::rule('admin/chargeback','admin.order.Order/chargeback');

    });
    //原因
    Route::group(function (){
        Route::rule('admin/getReasonList','admin.order.reason/index');
        Route::rule('admin/addReason','admin.order.reason/add');
        Route::rule('admin/delReason','admin.order.reason/del');
    });
    //财务
    Route::group(function (){
        Route::rule('admin/settlementOrderDetail','admin.order.Order/settlementOrderDetail');
    });
    //扫码买单
    Route::group(function (){
        Route::rule('miniapp/getQrcode','admin.Miniapp/getQrcode');
    });

    //商城统计
    Route::group(function (){
        Route::rule('admin/getMallStatisticsCount','admin.Statistics/getMallStatisticsCount');
        Route::rule('admin/getMallStatisticsTakeCountRanking','admin.Statistics/getMallStatisticsTakeCountRanking');
        Route::rule('admin/getMallStatisticsViewsRanking','admin.Statistics/getMallStatisticsViewsRanking');
        Route::rule('admin/getMallStatisticsTrend','admin.Statistics/getMallStatisticsTrend');
    });

    //收银
    Route::group(function (){
        //分类
        Route::rule('admin/cashDepartList','admin.cash.GoodsCategory/departList');
        Route::rule('admin/saveCashCategory','admin.cash.GoodsCategory/saveCategory');
        Route::rule('admin/cashCategoryList','admin.cash.GoodsCategory/list');
        Route::rule('admin/cashCategoryStatus','admin.cash.GoodsCategory/saveStatus');
        Route::rule('admin/cashCategorySort','admin.cash.GoodsCategory/sort');
        Route::rule('admin/cashCategoryIcon','admin.cash.GoodsCategory/icon');
        Route::rule('admin/cashCategoryInfo','admin.cash.GoodsCategory/show');
        Route::rule('admin/cashCategoryDel','admin.cash.GoodsCategory/del');

        //菜单
        Route::rule('admin/cashGoodsList','admin.cash.Goods/list');
        Route::rule('admin/cashGoodsSave','admin.cash.Goods/save');
        Route::rule('admin/cashGoodsShow','admin.cash.Goods/show');
        Route::rule('admin/cashShowSetMeal','admin.cash.Goods/showSetMeal');
        Route::rule('admin/cashSaveSetMeal','admin.cash.Goods/saveSetMeal');
        Route::rule('admin/cashGoodsCopy','admin.cash.Goods/copy');
        Route::rule('admin/cashGoodsStatus','admin.cash.Goods/status');
        Route::rule('admin/cashGoodsDel','admin.cash.Goods/del');
        Route::rule('admin/cashSaveVipDiscount','admin.cash.Goods/saveVipDiscount');

        //点餐设置
        Route::rule('admin/orderSetCashShow','admin.cash.OrderSet/cashShow');
        Route::rule('admin/cashOrderSetShow','admin.cash.OrderSet/cashShow');
        Route::rule('admin/orderSetCodeShow','admin.cash.OrderSet/codeShow');
        Route::rule('admin/orderSetCashSave','admin.cash.OrderSet/cashSave');
        Route::rule('admin/orderSetCodeSave','admin.cash.OrderSet/codeSave');

        //结算管理
        Route::rule('admin/SettlementCategory','admin.cash.SettlementManage/category');
        Route::rule('admin/SettlementList','admin.cash.SettlementManage/list');
        Route::rule('admin/SettlementSave','admin.cash.SettlementManage/save');
        Route::rule('admin/SettlementInfo','admin.cash.SettlementManage/info');
        Route::rule('admin/SettlementUpdateStatus','admin.cash.SettlementManage/updateStatus');
        Route::rule('admin/SettlementDel','admin.cash.SettlementManage/del');
        //打印规则
        Route::rule('admin/ProductionCenterInfo','admin.cash.ProductionCenter/info');
        Route::rule('admin/ProductionCenterSave','admin.cash.ProductionCenter/save');
        Route::rule('admin/ProductionCenterDefault','admin.cash.ProductionCenter/default_receipt');
        Route::rule('admin/ProductionCenterPrintSave','admin.cash.ProductionCenter/printSave');
        Route::rule('admin/ProductionCenterSetList','admin.cash.ProductionCenter/printSetList');
    });



})->middleware([\app\beautiful\middleware\Base::class,\app\beautiful\middleware\AdminCheck::class]);

